<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
//特碼樣版
$arrCon = file($strTemplatePath."NumberTemplate010203.html");
$strCon010203 = join("", $arrCon);
$strCon010203 = str_replace(chr(13), "", $strCon010203);
$strCon010203 = str_replace(chr(10), "", $strCon010203);

//正碼樣版
$arrCon = file($strTemplatePath."NumberTemplate040506.html");
$strCon040506 = join("", $arrCon);
$strCon040506 = str_replace(chr(13), "", $strCon040506);
$strCon040506 = str_replace(chr(10), "", $strCon040506);

//連碼樣版
$arrCon = file($strTemplatePath."NumberTemplate0711.html");
$strCon0711 = join("", $arrCon);
$strCon0711 = str_replace(chr(13), "", $strCon0711);
$strCon0711 = str_replace(chr(10), "", $strCon0711);

//正碼 1-6 樣版
$arrCon = file($strTemplatePath."NumberTemplate121314.html");
$strCon121314 = join("", $arrCon);
$strCon121314 = str_replace(chr(13), "", $strCon121314);
$strCon121314 = str_replace(chr(10), "", $strCon121314);

//特碼生肖色波樣版
$arrCon = file($strTemplatePath."NumberTemplate1718.html");
$strCon1718 = join("", $arrCon);
$strCon1718 = str_replace(chr(13), "", $strCon1718);
$strCon1718 = str_replace(chr(10), "", $strCon1718);

//一般生肖尾數樣版
$arrCon = file($strTemplatePath."NumberTemplate1920.html");
$strCon1920 = join("", $arrCon);
$strCon1920 = str_replace(chr(13), "", $strCon1920);
$strCon1920 = str_replace(chr(10), "", $strCon1920);

//正1-6特樣版
$arrCon = file($strTemplatePath."NumberTemplate2126.html");
$strCon2126 = join("", $arrCon);
$strCon2126 = str_replace(chr(13), "", $strCon2126);
$strCon2126 = str_replace(chr(10), "", $strCon2126);

//特半波樣版
$arrCon = file($strTemplatePath."NumberTemplate29.html");
$strCon29 = join("", $arrCon);
$strCon29 = str_replace(chr(13), "", $strCon29);
$strCon29 = str_replace(chr(10), "", $strCon29);

//五不中樣版
$arrCon = file($strTemplatePath."NumberTemplate31.html");
$strCon31 = join("", $arrCon);
$strCon31 = str_replace(chr(13), "", $strCon31);
$strCon31 = str_replace(chr(10), "", $strCon31);

//生肖連樣版
$arrCon = file($strTemplatePath."NumberTemplate3237.html");
$strCon3237 = join("", $arrCon);
$strCon3237 = str_replace(chr(13), "", $strCon3237);
$strCon3237 = str_replace(chr(10), "", $strCon3237);

//尾數連樣版
$arrCon = file($strTemplatePath."NumberTemplate3843.html");
$strCon3843 = join("", $arrCon);
$strCon3843 = str_replace(chr(13), "", $strCon3843);
$strCon3843 = str_replace(chr(10), "", $strCon3843);

foreach($_strRealSupplement as $k => $v){
	$strCon010203 = str_replace("{".$k."}", $v, $strCon010203);
	$strCon040506 = str_replace("{".$k."}", $v, $strCon040506);
	$strCon0711 = str_replace("{".$k."}", $v, $strCon0711);
	$strCon121314 = str_replace("{".$k."}", $v, $strCon121314);
	$strCon1718 = str_replace("{".$k."}", $v, $strCon1718);
	$strCon1920 = str_replace("{".$k."}", $v, $strCon1920);
	$strCon2126 = str_replace("{".$k."}", $v, $strCon2126);
	$strCon29 = str_replace("{".$k."}", $v, $strCon29);
	$strCon31 = str_replace("{".$k."}", $v, $strCon31);
	$strCon3237 = str_replace("{".$k."}", $v, $strCon3237);
	$strCon3843 = str_replace("{".$k."}", $v, $strCon3843);
}
//生肖
for($i = 1; $i <= 12; $i++){
	$strCon1718 = str_replace("{Animals".$i."}", $_arrAnimals[$i], $strCon1718);
	//$strCon1718 = str_replace("{AnimalsNumber".$i."}", $_arrAnimalsParams[$i], $strCon1718);
	$strCon1920 = str_replace("{Animals".$i."}", $_arrAnimals[$i], $strCon1920);
	//$strCon1920 = str_replace("{AnimalsNumber".$i."}", $_arrAnimalsParams[$i], $strCon1920);
	$strCon29 = str_replace("{HelfColor".(string)($i - 1)."}", $_strSame_String["SHelfColor".(string)($i - 1)], $strCon29);
	$strCon29 = str_replace("{HelfColorNumber".(string)($i - 1)."}", $_arrHelfColor[$i - 1], $strCon29);
	$strCon3237 = str_replace("{Animals".$i."}", $_arrAnimals[$i], $strCon3237);
}
//尾數
for($i = 0; $i <= 9; $i++){
	$strCon1920 = str_replace("{Mantissa".$i."}", $i."&nbsp;".$_strSame_String["Mantissa"], $strCon1920);
	$strCon3843 = str_replace("{Mantissa".$i."}", $i."&nbsp;".$_strSame_String["Mantissa"], $strCon3843);
}
//色波
for($i = 0; $i <= 2; $i++){
	$strCon121314 = str_replace("{Color".$i."}", $_strSame_String["Color".$i], $strCon121314);
	$strCon1718 = str_replace("{Color".$i."}", $_strSame_String["Color".$i], $strCon1718);
}
//正碼 1- 6
for($i = 1; $i <= 6; $i++){
	$strCon121314 = str_replace("{NormalNo".$i."}", $_strSame_String["NormalNo".$i], $strCon121314);
}
$strCon121314 = str_replace("{SOdd}", $_strSame_String[SOdd], $strCon121314);
$strCon121314 = str_replace("{SEven}", $_strSame_String[SEven], $strCon121314);

$strCon = "var strLayer010203=\"".addslashes($strCon010203)."\";\n";
$strCon .= "var strLayer040506=\"".addslashes($strCon040506)."\";\n";
$strCon .= "var strLayer0711=\"".addslashes($strCon0711)."\";\n";
$strCon .= "var strLayer121314=\"".addslashes($strCon121314)."\";\n";
//$strCon .= "var strLayer15=\"".addslashes($strCon15)."\";\n";
$strCon .= "var strLayer1718=\"".addslashes($strCon1718)."\";\n";
$strCon .= "var strLayer1920=\"".addslashes($strCon1920)."\";\n";
$strCon .= "var strLayer2126=\"".addslashes($strCon2126)."\";\n";
$strCon .= "var strLayer29=\"".addslashes($strCon29)."\";\n";
$strCon .= "var strLayer31=\"".addslashes($strCon31)."\";\n";
$strCon .= "var strLayer3237=\"".addslashes($strCon3237)."\";\n";
$strCon .= "var strLayer3843=\"".addslashes($strCon3843)."\";\n";

$strFile = __Root_Path."/inc/RealSupplementTemp".$_intLang.".js";
if(!writeFile($strFile, $strCon, "w"))ErrMsgOutputHTML("Error", "", 1);
/*=================================================================
header("Cache-Control: no-store, no-cache, must-revalidate");	  // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");															  // HTTP/1.0
<meta http-equiv="Content-Type" content="text/html; charset=utf-8 print $_Charset;?>">
<script language="JavaScript">
<!--
parent.strLayer010203="<?php print addslashes($strCon010203);?>";
parent.strLayer040506="<?php print addslashes($strCon040506);?>";
parent.strLayer0711="<?php print addslashes($strCon0711);?>";
parent.strLayer121314="<?php print addslashes($strCon121314);?>";
parent.strLayer1718="<?php print addslashes($strCon1718);?>";
parent.strLayer1920="<?php print addslashes($strCon1920);?>";
parent.ChangeBet(1);
//-->
</script>*/?>